
function loadAlbum()
{
	xmlhttp = new XMLHttpRequest();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			$("#khoalbum").append(xmlhttp.responseText);
			$("head").append("<script type='text/javascript' src='js template/fotorama.js'></script>");
			$("head").append("<script type='text/javascript' src='script sources/KhoAnhChiHoi.js'></script>");
			$("head").append("<link rel='stylesheet' href='style sources/KhoAnh.css' type='text/css' />");
		}
	}
	xmlhttp.open("GET","php sources/kho anh chi hoi/GetAlbum.php?offset="+offset+"&mach="+mach,true);
	xmlhttp.send();
	offset+=6;
}

$(document).ready(function(){$("#xemthemalbum").click( function()
{
	loadAlbum();
});
});

// load album của hội viên đang đăng nhập


function loadAnh()
{
	xmlhttp = new XMLHttpRequest();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			$("#albumanh").append(xmlhttp.responseText);
		}
	}
	
	xmlhttp.open("GET","php sources/kho anh chi hoi/GetAnh.php?maalbum="+maalbum+"&offset="+offset_anh,true);
	//location.href="php sources/kho anh/GetAnh.php?offset="+offset;
	xmlhttp.send();
	offset_anh+=30;
}
$(document).ready(function(){$("#xemthemanh").click( function()
{
	loadAnh();
});
});
